from  PyQt5.QtWidgets import *
import sys
app=QApplication(sys.argv)

widget=QWidget()
def showmsg():   #槽函数
    QMessageBox.information(widget,"信息提示","弹出框")

btn=QPushButton("按钮",widget)
btn.clicked.connect(showmsg) #信号
widget.show()
sys.exit(app.exec_())